<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="estilos.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p align="center" class="subtitulo"><strong>Listado de Usuarios</strong></p>
<table width="600" height="350" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr>
    <td width="600" height="342" align="center" valign="top">
	<table width="434" height="65" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <th width="30" bgcolor="#CCCCCC" class="negrita" scope="col">Nro.</th>
    <th width="25" bgcolor="#CCCCCC" class="negrita" scope="col">Id.</th>
    <th width="99" bgcolor="#CCCCCC" class="negrita" scope="col">Nombre</th>
    <th width="84" bgcolor="#CCCCCC" class="negrita" scope="col">Apellidos</th>
    <th width="126" bgcolor="#CCCCCC" class="negrita" scope="col">Dni</th>
    <th width="70" bgcolor="#CCCCCC" class="negrita" scope="col">Baja</th>
  </tr>
<%@page import="java.util.*, condominio.modelo.Persona" %>
<%
Collection<Persona> arreglo = (ArrayList<Persona>)request.getAttribute("listadousuario");
if(arreglo != null) { 
int i = 1; 
for(Persona x : arreglo) {
%>  
  <tr>
    <td align="center" class="columna"><%=i++ %></td>
    <td align="center" class="columna"><% out.print(x.getIdpersona()); %></td>
    <td align="center" class="columna"><% out.print(x.getNombres()); %></td>
    <td align="center" class="columna"><% out.print(x.getApellidos()); %></td>
    <td align="center" class="columna"><% out.print(x.getDni()); %></td>
    <td align="center"><a href="<%=request.getContextPath() %>/BajaUsuarioServlet?id=<%=x.getIdpersona() %>" class="columna">Baja</a></td>
  </tr>
<% }  
  } %>
</table>
	</td>
  </tr>
</table>
</body>
</html>